package com.ll.common.core.utils;


import org.springframework.stereotype.Component;

@Component
public class UserUtils {
    private static final ThreadLocal<Integer> userThreadLocal = new ThreadLocal<>();

    public static void setUId(Integer uid){
        userThreadLocal.set(uid);
    }

    public static Integer getUId(){
        return userThreadLocal.get();
    }

    public static void remove(){
        userThreadLocal.remove();
    }
}
